package com.quectel.emp.vo.patrolqualitycheck;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * 编写说明
 *
 * @author bob
 * @email bob.yu@quectel.com
 * @date 2022/10/18 9:57
 */
@Data
@Schema
public class PatrolQualityCheckVo {

    @Schema(description = "质量检查基础信息")
    private PatrolQualityCheckVo.BaseInfo baseInfo;

    @Schema(description = "上报记录list")
    List<PatrolQualityCheckVo.SubjectReportVo> reportVoList;

    @Data
    @Schema
    @AllArgsConstructor
    @NoArgsConstructor
    public static class BaseInfo implements Serializable {
        @Schema(description = "手机定位地址")
        private String location;

        @Schema(description = "人工输入位置")
        private String checkLocation;

        @Schema(description = "巡检名称")
        private String name;

        @Schema(description = "经度")
        private Double lng;

        @Schema(description = "维度")
        private Double lat;

    }

    @Data
    @Schema
    @AllArgsConstructor
    @NoArgsConstructor
    public static class SubjectReportVo implements Serializable {

        @Schema(description = "质量巡检项目名称")
        private String subjectName;

        @Schema(description = "项目id")
        private Long subjectId;

        @Schema(description = "状态0异常1正常")
        private Byte status;

        @Schema(description = "是否分配工单0否1是")
        private Byte assignWorkOrder;

        @Schema(description = "工单处理人id 请调用 empapi/workOrder/getServiceUsers 接口获取")
        private Long assignUserId;


        @Schema(description = "抓拍图片")
        private String snapshotImg;

        @Schema(description = "事件描述")
        private String detail;
    }


}
